package com.yc.healthy.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.healthy.entity.Cuisine;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lyl
 * @since 2023-03-08
 */
public interface CuisineMapper extends BaseMapper<Cuisine> {

    @Select("select * from cuisine where ctype = #{ctype}")
    List<Cuisine> SelectBytype(@Param("ctype") String type);

//    concat('%', ?, '%')
    @Select("select * from cuisine where cname like concat('%', #{cname}, '%')")
    List<Cuisine> SelectByname(@Param("cname") String name);
}
